package com.atguigu.eduservice.config;

import com.baomidou.mybatisplus.core.injector.ISqlInjector;
import com.baomidou.mybatisplus.extension.injector.LogicSqlInjector;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * TODO
 *
 * @author Administrator
 * @version 1.0
 * @date 2021/2/6 10:43
 */
@Configuration
@MapperScan("com.atguigu.eduservice.mapper")
public class EduConfig {
    
    /**
     *
     * 逻辑删除
     * @author 粟德桡
     * @date 2021/2/6 18:51
     * @return com.baomidou.mybatisplus.core.injector.ISqlInjector
     */
    @Bean
    public ISqlInjector sqlInjector() {
       return new LogicSqlInjector();
    }

    /**2 * 分页插件3 */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
    
}
